<template>
    <div>
        <div>
            <h4 style="text-align: center;margin: 0 20px">{{info.paperTitle}}</h4>
            <div style="display: flex;justify-content: space-around;margin-top: 20px"><span>答题人：{{info.userName}}</span><span>联系方式：{{info.userCode}}</span><span>答题时间：{{info.createTime}}</span></div>
            <div style="display: flex;justify-content: space-around;margin-top: 20px"><span>省：{{info.province}}</span><span>市：{{info.area}}</span><span>区：{{info.county}}</span><span>详细地址：{{info.address}}</span></div>
        </div>
        <div class="item" v-for="(list,key) in info.questionList">
            <h4>{{key+1}}: {{list.title}}</h4>
            <div>答案： {{list.answerScontent}}</div>
        </div>
    </div>
</template>
<script>
    import qs from 'qs'
    import API from '../../config/api'
    export default {
        data(){
          return{
              info:{},
              id: ''
          }
        },
        created(){
            this.id = this.$route.params.id;
            this.getResult()
        },
        methods:{
            getResult(){
                let data = {id: this.id};
                this.axios.post(API.RESULT_DETAIL, qs.stringify(data)).then(res=>{
                    let data = res.data;
                    if (data.code == 200){
                        this.info = data.data
                    }
                })
            }
        }
    }
</script>
<style>
    .item{
        padding-left: 40px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
